GetAxisVelocity

獲取軸之當前速度,此速度可為設定速度或實際速度。

語法

KsError GetAxisVelocity(
     int Index,
     McSource Source,
     double* Velocity
);

參數

Index:軸的索引。索引以零為起點;別名將影響此參數。

Source:選擇欲讀取的速度值,請見 McSource 類型。

Velocity:接收速度的值指標。

回傳值

如果此函式執行成功,會回傳 errNoError,否則會傳回錯誤碼。如需更多有關錯誤碼的資訊,請參閱 KsError 清單。

範例

複製
double axisVel = 0.0;
KsError nRet = GetAxisVelocity(0, McSource::mcSetValue, &axisVel);

使用需求

  RT Win32
最低支援版本 4.0 4.0
標頭檔 ksmotion.h ksmotion.h
程式庫 KsApi_Rtss.lib KsApi.lib

參見

GetAxisFollowingError

GetAxisPosition

GetAxisTorque

SetAxisVelocity